home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / Libraries / DCLAP 6d / dclap6d / SeqPups / apps / fastDNAml.doc < prev    next >
Encoding:
Text File  |  1996-07-05  |  15.8 KB  |  472 lines  |  [TEXT/R*ch]

  1.                              fastDNAml 1.0
  2.  
  3.  
  4. Gary J. Olsen, Department of Microbiology
  5. University of Illinois, Urbana, IL
  6. gary@phylo.life.uiuc.edu
  7.  
  8. Hideo Matsuda, Mathematics and Computer Science
  9. Argonne National Laboratory, Argonne, IL
  10. matsuda@mcs.anl.gov
  11.  
  12. Ray Hagstrom, Physics
  13. Argonne National Laboratory, Argonne, IL
  14. hagstrom@mcs.anl.gov
  15.  
  16. Ross Overbeek, Mathematics and Computer Science
  17. Argonne National Laboratory, Argonne, IL
  18. overbeek@mcs.anl.gov
  19.  
  20.  
  21.  
  22. What is fastDNAml
  23.  
  24. fastDNAml is a program derived from Joseph Felsenstein's version 3.3 DNAML
  25. (part of his PHYLIP package).  Users should consult the documentation for
  26. DNAML before using this program.
  27.  
  28. fastDNAml is an attempt to solve the same problem as DNAML, but to do so
  29. faster and using less memory, so that larger trees and/or more bootstrap
  30. replicates become tractable.  Much of fastDNAml is merely a recoding of the
  31. PHYLIP 3.3 DNAML program from PASCAL to C.
  32.  
  33. DNAML includes the following notice:
  34.  
  35. version 3.3. (c) Copyright 1986, 1990 by the University of Washington and
  36. Joseph Felsenstein.  Written by Joseph Felsenstein.  Permission is granted to
  37. copy and use this program provided no fee is charged for it and provided that
  38. this copyright notice is not removed.
  39.  
  40.  
  41.  
  42. Why is fastDNAml faster?
  43.  
  44. Some recomputation of values has been eliminated (Joe Felsenstein has done
  45. much of this in version 3.4 DNAML).
  46.  
  47. The optimization of branch lengths has been accelerated by changing from an EM
  48. method to Newton's method.
  49.  
  50. The strategy for simultaneously optimizing all of the branches on the tree has
  51. been modified to spend less time getting an individual branch right before
  52. improving the other branches.
  53.  
  54.  
  55.  
  56. Other new features in fastDNAml
  57.  
  58. fastDNAml includes a checkpoint feature to regularly save its progress toward
  59. finding a large tree.  If the program is interrupted, a minor change to the
  60. input file and adding the R (restart) option permits the work to be resumed
  61. from the last checkpoint.
  62.  
  63. The new R {restart) option can also be used for more rapid addition of new
  64. sequences to a previously computed tree (when new sequences are added to the
  65. alignment, it is best if the relative alignment of the previous sequences is
  66. not altered).
  67.  
  68. The G (global) option has been generalized to permit crossing any number of
  69. branches during tree rearrangements.  In addition, it is possible to modify
  70. the extent of rearrangement explored during the sequential addition phase of
  71. tree building.
  72.  
  73. The G U (global and user tree) option combination instructs the program to
  74. find the best of the user trees, and then look for rearrangements that are
  75. better still.
  76.  
  77. The number of available rate categories has been raised from 9 to 35.
  78.  
  79. The weighting mask accepts values from 0 through 35.
  80.  
  81. The new B (bootstrap) option causes generation of a bootstrap sample, drawn
  82. from the input data.
  83.  
  84. The program includes "P4" code for distributing the problem over multiple
  85. processors (either within one machine, or across multiple machines).
  86.  
  87.  
  88.  
  89. Do DNAML and fastDNAml give the same answer?
  90.  
  91. This is not yet fully established.
  92.  
  93. The likelihoods and branch lengths sometimes differ very slightly due to
  94. different criteria for stopping the optimization process.
  95.  
  96. An earlier version of fastDNAml had an error in generating tree rearrangements
  97. in the search for better trees.  This did not affect the default (local)
  98. rearrangements, but could have caused the program to miss some global
  99. rearrangements.  We think that it is now correct, but it is one of the most
  100. difficult program features to test.
  101.  
  102. Little has been done to check the confidence limits on branch lengths.
  103.  
  104. If you are concerned, you can supply a tree inferred by fastDNAml as a user
  105. tree to PHYLIP DNAML and let it (1) reoptimize branch lengths, (2) tell you
  106. the confidence limits and (3) tell you the tree likelihood.  (It may be
  107. necessary to remove the quotation marks around the species names in the
  108. treefile.)
  109.  
  110.  
  111.  
  112. Features in the works
  113.  
  114. Test subtree exchanges (as well as moving a single subtree) in the search for
  115. better trees.
  116.  
  117. More quickly evaluating whether a tree is a good candidate for best tree.
  118.  
  119. Allowing the program to optimize any user-defined subset of branches when user
  120. lengths are supplied.
  121.  
  122. Maintaining a list of the several best trees, not just the (single) best.
  123.  
  124.  
  125.  
  126. Input and Options
  127.  
  128.  
  129. Basics
  130.  
  131. The input to fastDNAml is similar to that used by DNAML (and the other PHYLIP
  132. programs).  The user should consult the PHYLIP documentation for a basic
  133. description of the format.
  134.  
  135. This version of fastDNAml expects to get its input from stdin (standard input)
  136. and writes its output to stdout (standard output).  (There are compile time
  137. options to modify this, for those who care to get into such things.)
  138.  
  139. On a UNIX system, it is a simple matter to redirect input from a file and
  140. output to a file:
  141.  
  142.     fastDNAml < infile > outfile
  143.  
  144. On a VMS system it is only slightly more difficult.  Immediately before
  145. running the program, one includes two commands that define the input and
  146. output files:
  147.  
  148.     $ Define/User  Sys$Input   infile
  149.     $ Define/User  Sys$Output  outfile
  150.     $ Run fastDNAml
  151.  
  152. The default input data format is Interleaved (see I option).  To help get data
  153. from a GenBank or similar format, numbers in the sequence data (i.e., sequence
  154. position numbers) are ignored.
  155.  
  156. (Note that the program also writes a file called checkpoint.PID.  See the R
  157. option below for more description.)
  158.  
  159.  
  160. 1 -- Print Data
  161.  
  162. By default, fastDNAml 1.0 does not echo the sequence data to the output file.
  163. Option 1 reverses this.
  164.  
  165.  
  166. 3 -- Do Not Print Tree
  167.  
  168. By default, fastDNAml 1.0 prints the final tree to the output file.  Option 3
  169. reverses this.
  170.  
  171.  
  172. 4 -- Write Tree to File
  173.  
  174. By default, fastDNAml 1.0 does not write a machine readable (Newick format)
  175. copy of the final tree to an output file.  Option 4 reverses this.  The tree
  176. output file will be called treefile.PID (where PID is the process ID under
  177. which fastDNAml is running).
  178.  
  179.  
  180. B -- Bootstrap
  181.  
  182. Generates a bootstrap sample of the input data.  Requires auxiliary data line
  183. of the form:
  184.  
  185.     B  random_number_seed
  186.  
  187. If the W option is used, only positions that have nonzero weights are used in
  188. computing the bootstrap sample.  Warning:  For a given random number seed, the
  189. sample will always be the same.
  190.  
  191. PHYLIP DNAML does not include a bootstrap option.  (Use the DNABOOT program.)
  192.  
  193.  
  194. C -- Categories
  195.  
  196. Requires auxiliary data of the form:
  197.  
  198.     C  number_of_categories  list_of_category_rates
  199.  
  200. The maximum number of categories is 35.  This line is followed by a list of
  201. the rates for each site:
  202.  
  203.     Categories  list_of_categories  [per site, one or more lines]
  204.  
  205. Category "numbers" are ordered: 1, 2, 3, ..., 9, A, B, ..., Y, Z.  Category
  206. zero (undefined rate) is permitted at sites with a zero in a user-supplied
  207. weighting mask.
  208.  
  209. PHYLIP DNAML is limited to categories 1 through 9.  Also, in PHYLIP version
  210. 3.3, the categories data came after all the other auxiliary data, but before
  211. the user-supplied base frequencies and sequence data.  If you make the C line
  212. your last auxiliary data line, the programs will behave the same.
  213.  
  214.  
  215. F -- Empirical Frequencies
  216.  
  217. Instructs the program to use empirical base frequencies derived from the
  218. sequence data.  Therefore the input file should not include a base frequencies
  219. line preceding the data.
  220.  
  221.  
  222. G -- Global
  223.  
  224. If the global option is specified, there may also be an [optional] auxiliary
  225. data line of form:
  226.  
  227.     G  N1
  228.  
  229. or
  230.  
  231.     G  N1  N2
  232.  
  233. N1 is the number of branches to cross in rearrangements of the completed tree.
  234. The value of N2 is the number of branches to cross in testing rearrangements
  235. during the sequential addition phase of tree inference.
  236.  
  237.     N1 = 1:            local rearrangement (default without G option)
  238.  
  239.     1 < N1 < numsp-3:  regional rearrangements (crossing N1 branches)
  240.  
  241.     N1>= numsp-3:      global rearrangements (default with G option)
  242.  
  243.  
  244.  
  245.     N2 <= N1           the default N2 is 1, local rearrangements.
  246.  
  247. The G option can also be used to force branch swapping on user trees, that is,
  248. a combination of G and U options.
  249.  
  250. If the auxiliary line is supplied, it cannot be the last line of auxiliary
  251. data.  (It may be necessary to add the T option with an auxiliary data line of
  252.  
  253.     T 2.0
  254.  
  255. if no other auxiliary data are used.)
  256.  
  257. PHYLIP DNAML does not support the auxiliary data line or branch swapping on a
  258. user tree.
  259.  
  260.  
  261. I -- Not Interleaved
  262.  
  263. By default, fastDNAml 1.0 expects data lines for the various sequences in an
  264. interleaved format (as did PHYLIP 3.3 DNAML).  The I option reverses the
  265. expected format (to non-interleaved data, in which all the data lines for one
  266. sequence before the next sequence begins).  This is particularly useful for
  267. editing a GenBank or equivalent format into a valid input file (note that
  268. numbers within the sequence data are ignored, so it is not necessary to remove
  269. them).
  270.  
  271. If all the data for each sequence are on one line, then the interleaved  and
  272. non-interleaved formats are degenerate.  (This is the way David Swofford's
  273. PAUP program writes PHYLIP format output files.)  The drawback is that many
  274. programs do not handle long lines of text.  This includes the vi and EDT text
  275. editors, many electronic mail programs, and some versions of FTP for VAX/VMS
  276. systems.
  277.  
  278. PHYLIP 3.3 DNAML expects interleaved data, and does not include an I option to
  279. alter this.  PHYLIP 3.4 DNAML accepts an I option, but the default format is
  280. reversed.
  281.  
  282.  
  283. J -- Jumble
  284.  
  285. Randomize the sequence addition order.  Requires an auxiliary input line of
  286. the form:
  287.  
  288.     J  random_number_seed
  289.  
  290. Note that fastDNAml explores a very small number of alternative tree
  291. topologies relative to a typical parsimony program.  There is a very real
  292. chance that the search procedure will not find the tree topology with the
  293. highest likelihood.  Altering the order of taxon addition and comparing the
  294. trees found is a fairly efficient method for testing convergence.  Typically,
  295. it would be nice to find the same best tree at least twice (if not three
  296. times), as opposed to simply performing some fixed number of jumbles and
  297. hoping that at least one of them will be the optimum.
  298.  
  299.  
  300. L -- User Lengths
  301.  
  302. Causes user trees to be read with branch lengths (and it is an error to omit
  303. any of them).  Without the L option, branch lengths in user trees are not
  304. required, and are ignored if present.
  305.  
  306.  
  307. O -- Outgroup
  308.  
  309. Use the specified sequence number for the outgroup.  Requires an auxiliary
  310. data line of the form:
  311.  
  312.     O  outgroup_number
  313.  
  314. This option only affects the way the tree is drawn (and written to the
  315. treefile).
  316.  
  317.  
  318. Q -- Quickadd
  319.  
  320. This option greatly decreases the time in initially placing a new sequence in
  321. the growing tree (but does not change the time required to subsequently test
  322. rearrangements).  The overall time savings seems to be about 30%, based on a
  323. very limited number of test cases.  Its downside, if any, is unknown.  This
  324. will probably become default program behavior in the near future.
  325.  
  326. If the analysis is run with a global option of "G 0 0", so that no
  327. rearrangements are permitted, the tree is build very approximately, but very
  328. quickly.  This may be of greatest interest if the question is, "Where does
  329. this one new sequence fit into this known tree?  The known tree is provided
  330. with the restart option, below.
  331.  
  332. PHYLIP DNAML does not include anything comparable to the quickadd option.
  333.  
  334.  
  335. R -- Restart
  336.  
  337. The R option causes the program to read a user-supplied tree with less than
  338. the full number of taxa as the starting point for sequential addition of the
  339. remaining taxa.  Thus, the sequence data must be followed by a valid (Newick
  340. format) tree.  (The phylip_tree/2, prolog fact format, is now also supported.)
  341.  
  342. The restart option can also be used to increase the range of the search for
  343. alternative (better) trees.  For example, you can take a tree produced with
  344. only "local" tree rearrangements, and increase the rearrangements to
  345. "regional" or "global" by combining the appropriate global option with the
  346. restart option.  If the starting tree was written by fastDNAml, then the
  347. extent of rearrangements is saved with the tree, and will be used as the
  348. starting point for the additional search.  If the tree was already globally
  349. optimized, then no additional searching will be performed.
  350.  
  351. To support the R option, after each taxon is added to the growing tree, and
  352. after each round of rearrangements, the program appends a checkpoint tree to a
  353. file called checkpoint.PID, where PID is the process number of the running
  354. fastDNAml program.  The last line of this file needs to be appended to the
  355. input file when the R option is used.  (This should not be confused with the U
  356. (user tree) option, which expects a number followed by that number of trees.
  357. No additional taxa are added to user trees.)
  358.  
  359. The UNIX utility tail can be used to remove the last tree from the checkpoint
  360. file, and the utility cat can be used to append it to the input.  For example,
  361. the following script can be used to add a starting tree and the R option to a
  362. data file, and restart fastDNAml:
  363.  
  364.     #! /bin/sh
  365.     if test $# -ne 1
  366.         then echo "Usage:  restart checkpoint_file"
  367.         exit
  368.     fi
  369.     read first_line             # first line of data file
  370.     echo "$first_line R"        # add restart option
  371.     cat -                       # rest of data file
  372.     tail -1 $1                  # append last tree in checkpoint file
  373.  
  374. If this shell script is in the file called restart, then one might use the
  375. command:
  376.  
  377.     restart  checkpoint.21312  < infile  | fastDNAml  > new_outfile
  378.      ^script  ^checkpoint tree    ^data     ^dnaml program  ^output_file
  379.  
  380. If this is too opaque, don't worry about it, or talk with your local unix
  381. wizard.  In the mean time, this and other useful shell scripts are provided
  382. with the program.
  383.  
  384. PHYLIP DNAML does not write checkpoint trees and does not have a restart
  385. option.
  386.  
  387.  
  388. T -- Transition/transversion ratio
  389.  
  390. Use a user-specified ratio of transition to transversion type substitutions.
  391. Without the T option, a value of 2.0 is used.  Requires an auxiliary data line
  392. of the form:
  393.  
  394.     T  ratio
  395.  
  396. (Note that a T option with a
  397.  
  398.     T  2.0
  399.  
  400. auxiliary data line does nothing, but can provide a last auxiliary data line
  401. following optional auxiliary data, such as
  402.  
  403.     G 3 2
  404.  
  405. or
  406.  
  407.     Y 2
  408.  
  409. that cannot be last.)
  410.  
  411.  
  412. U -- User Tree(s)
  413.  
  414. Read an input line with the number of user-specified trees, followed by the
  415. specified number of trees.  These data immediately follow the sequence data.
  416.  
  417. The trees must be in Newick format, and terminated with a semicolon.  (The
  418. program also accepts a pseudo_newick format, which is a valid prolog fact.)
  419.  
  420. The tree reader in this program is more powerful than that in PHYLIP 3.3.  In
  421. particular, material enclosed in square brackets, [ like this ], is ignored as
  422. comments; taxa names can be wrapped in single quotation marks to support the
  423. inclusion of characters that would otherwise end the name (i.e., '(', ')',
  424. ':', ';', '[', ']', ',' and ' '); names of internal nodes are properly
  425. ignored; and exponential notation (such as 1.0E-6) for branch lengths is
  426. supported.
  427.  
  428.  
  429. W -- Weights
  430.  
  431. Read user-specified column weighting information.  This option requires
  432. auxiliary data of the form:
  433.  
  434.     Weights     list_of_weight_values    [per site, one or more lines]
  435.  
  436. It is necessary that the weight values not start before the 11'th character in
  437. the line, or some of them will be lost.  Weights from 0 to 35 are indicated by
  438. the series: 0, 1, 2, 3, ..., 9, A, B, ..., Y, Z.
  439.  
  440. PHYLIP DNAML does not support user weights with values other than 1 or 0.
  441. This limit has been removed in fastDNAml 1.0 to permit the use of user weights
  442. as a mechanism for representing a bootstrap sample (that is, only the
  443. auxiliary data lines change, not the body of the data file).
  444.  
  445.  
  446. Y -- Write Tree
  447.  
  448. Output final tree to an output file called treefile.PID.  By default the tree
  449. is in Newick format.
  450.  
  451. If an auxiliary input line of the form
  452.  
  453.     Y 2
  454.  
  455. is also included, then the tree output file is written as a prolog fact:
  456.  
  457.     pseudo_newick([Comment], (Subtree1, Subtree2, Subtree3):Length).
  458.  
  459. where each subtree is either
  460.  
  461.     (Subtree1,Subtree2):Length
  462.  
  463. or
  464.  
  465.     Label:Length
  466.  
  467. Because this auxiliary input line is optional, it cannot be the last auxiliary
  468. data line.
  469.  
  470. PHYLIP DNAML does not append the PID (process ID) to the tree file name and
  471. does not support the prolog format output.
  472.